package com.yangfan.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",fallback = PaymentServiceFallback.class)
//@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentService {

    @GetMapping(value = "/hystrix/ok/{id}")
    String ok (@PathVariable(value = "id") Long id);


    @GetMapping(value = "/hystrix/error/{id}")
    String error(@PathVariable(value = "id") Long id);

}
